VERSION 4.00 Begin VB.Form frmSelectLook Appearance = 0 'Flat BackColor = &H00C0C0C0& BorderStyle = 3 'Fixed Dialog ClientHeight = 4455 ClientLeft = 675 ClientTop = 2190 ClientWidth = 6480 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 4860 Left = 615 LinkTopic = "Form5" MaxButton = 0 'False MinButton = 0 'False ScaleHeight = 4455 ScaleWidth = 6480 Top = 1845 Width = 6600 Begin VB.CommandButton cmdCancel Appearance = 0 'Flat BackColor = &H80000005& Caption = "Cancel" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 5160 TabIndex = 15 Top = 3960 Width = 1155 End Begin VB.CommandButton cmdNext Appearance = 0 'Flat BackColor = &H80000005& Caption = "Next >" Default = -1 'True BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 3840 TabIndex = 0 Top = 3960 Width = 1155 End Begin VB.CommandButton cmdBack Appearance = 0 'Flat BackColor = &H80000005& Caption = "< &Back" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 2700 TabIndex = 14 Top = 3960 Width = 1155 End Begin Threed.SSPanel pnlStndoc Height = 3390 Left = 180 TabIndex = 13 Top = 180 Width = 1950 _Version = 65536 _ExtentX = 3440 _ExtentY = 5980 _StockProps = 15 ForeColor = 4210752 BackColor = 8421376 BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty BevelOuter = 1 Begin VB.Image imgStndoc Appearance = 0 'Flat Height = 3360 Left = 0 Picture = "SELLOOK.frx":0000 Top = 0 Width = 1920 End End Begin Threed.SSFrame Frame3D3 Height = 1215 Left = 2280 TabIndex = 4 Top = 1800 Width = 1935 _Version = 65536 _ExtentX = 3413 _ExtentY = 2143 _StockProps = 14 Caption = "Orientation" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Begin Threed.SSOption btnLandscape Height = 315 Left = 120 TabIndex = 7 TabStop = 0 'False Top = 720 Width = 1695 _Version = 65536 _ExtentX = 2990 _ExtentY = 556 _StockProps = 78 Caption = "&Landscape" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty End Begin Threed.SSOption btnPortrait Height = 255 Left = 120 TabIndex = 6 Top = 360 Width = 1215 _Version = 65536 _ExtentX = 2143 _ExtentY = 450 _StockProps = 78 Caption = "Po&rtrait" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Value = -1 'True End End Begin Threed.SSFrame Frame3D2 Height = 2175 Left = 4320 TabIndex = 3 Top = 840 Width = 2055 _Version = 65536 _ExtentX = 3625 _ExtentY = 3836 _StockProps = 14 Caption = "Options" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Begin Threed.SSCheck ctlResize Height = 255 Left = 120 TabIndex = 12 Top = 1800 Width = 1455 _Version = 65536 _ExtentX = 2566 _ExtentY = 450 _StockProps = 78 Caption = "Fi&t in Grid" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Value = -1 'True End Begin Threed.SSCheck ctlProperties Height = 255 Left = 120 TabIndex = 11 Top = 1440 Width = 1455 _Version = 65536 _ExtentX = 2566 _ExtentY = 450 _StockProps = 78 Caption = "&Properties" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Value = -1 'True End Begin Threed.SSCheck ctlGridlines Height = 255 Left = 120 TabIndex = 10 Top = 720 Width = 1455 _Version = 65536 _ExtentX = 2566 _ExtentY = 450 _StockProps = 78 Caption = "&Gridlines" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Value = -1 'True End Begin Threed.SSCheck ctlFooter Height = 255 Left = 120 TabIndex = 9 Top = 1080 Width = 1575 _Version = 65536 _ExtentX = 2778 _ExtentY = 450 _StockProps = 78 Caption = "&Footer" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Value = -1 'True End Begin Threed.SSCheck ctlHeader Height = 255 Left = 120 TabIndex = 8 Top = 360 Width = 1575 _Version = 65536 _ExtentX = 2778 _ExtentY = 450 _StockProps = 78 Caption = "&Header" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Value = -1 'True End End Begin Threed.SSFrame Frame3D1 Height = 855 Left = 2280 TabIndex = 2 Top = 840 Width = 1935 _Version = 65536 _ExtentX = 3413 _ExtentY = 1508 _StockProps = 14 Caption = "Masters Per Page" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Begin VB.ComboBox ctlMastersPerPage Appearance = 0 'Flat BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 315 Left = 600 Style = 2 'Dropdown List TabIndex = 5 Top = 375 Width = 855 End End Begin VB.Line Line2 BorderColor = &H00FFFFFF& X1 = 180 X2 = 6300 Y1 = 3795 Y2 = 3795 End Begin VB.Label Label1 Appearance = 0 'Flat BackColor = &H80000005& BackStyle = 0 'Transparent Caption = "What kind of look do you want for your report?" BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} Name = "MS Sans Serif" Size = 8.25 Charset = 0 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000008& Height = 375 Left = 2280 TabIndex = 1 Top = 240 Width = 3555 End Attribute VB_Name = "frmSelectLook" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Private Sub btnLandscape_Click(index As Integer) If pageIsPortrait(gPageBack) Then pageOrientSwitch gPageBack End If End Sub Private Sub btnPortrait_Click(index As Integer) If pageIsLandscape(gPageBack) Then pageOrientSwitch gPageBack End If End Sub Private Sub Cancel_Click() End End Sub Private Sub cmdBack_Click() Hide frmSelectStencil.Top = Top frmSelectStencil.left = left frmSelectStencil.Show End Sub Private Sub cmdCancel_Click() End End Sub Private Sub cmdNext_Click() If formValid() = True Then Hide frmReport.Top = Top frmReport.left = left frmReport.Show End If End Sub Private Sub First_Click() Hide frmSelectStencil.Show End Sub Private Sub Form_Load() Dim s, t Dim sBegin, sEnd ' Initialize form. ' formInit frmSelectLook ' Center the picture imgStndoc.Top = pnlStndoc.Height / 2 - imgStndoc.Height / 2 imgStndoc.left = pnlStndoc.Width / 2 - imgStndoc.Width / 2 ' Initialize controls ' ' - Options ' ctlHeader.Value = gDoc.Header ctlFooter.Value = gDoc.Footer ctlGridlines.Value = gDoc.gridlines ctlProperties.Value = gDoc.properties ctlResize.Value = gDoc.resize ' - Orientation ' If pageIsPortrait(gPageBack) Then btnPortrait.Value = True Else btnLandscape.Value = True End If ' - Masters Per Page ' s = "" s = s & "1 x 1,1 x 2,1 x 3,1 x 4,1 x 5,1 x 6," s = s & "2 x 2,2 x 3,2 x 4,2 x 5,2 x 6," s = s & "3 x 3,3 x 4,3 x 5,3 x 6," s = s & "4 x 4,4 x 5,4 x 6," s = s & "5 x 5,5 x 6," s = s & "6 x 6," sEnd = 0 Do sBegin = sEnd sEnd = InStr(sBegin + 1, s, ",") If sEnd = 0 Then Exit Do End If t = Mid(s, sBegin + 1, sEnd - sBegin - 1) ctlMastersPerPage.AddItem t Loop ctlMastersPerPage.ListIndex = 12 ' 3 x 4 End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) End End Sub Private Function formValid() Dim stat Dim masters Dim rows Dim cols formValid = True ' default value ' Options ' gDoc.Header = ctlHeader.Value gDoc.Footer = ctlFooter.Value gDoc.gridlines = ctlGridlines.Value gDoc.properties = ctlProperties.Value gDoc.resize = ctlResize.Value ' Get number of masters per page ' masters = ctlMastersPerPage.text rows = Val(left(masters, 1)) cols = Val(Right(masters, 1)) ' Compute grid metrics ' gridCompute rows, cols End Function Private Sub Last_Click() If formValid() = True Then Hide frmReport.Show End If End Sub